package model;

import java.util.ArrayList;
import java.util.List;

public class Neighborhood {
	int id;
	List<Integer> machines;

	public Neighborhood() {
		machines = new ArrayList<Integer>();
	}

	public final int getId() {
		return id;
	}

	public final void setId(int id) {
		this.id = id;
	}

	public final List<Integer> getMachines() {
		return machines;
	}

	public void addMachine(Integer machine_id) {
		machines.add(machine_id);
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Neighborhood " + id);
		sb.append(" MACHINES [");
		for (Integer m : machines) {
			sb.append(m + " ");
		}
		sb.deleteCharAt(sb.length() - 1);
		sb.append("]");
		return sb.toString();
	}
}
